package com.yupi.project.service;

import com.yupi.model.entity.Post;
import com.yupi.model.entity.UserInterfaceInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.project.common.BaseResponse;
import com.yupi.project.model.vo.InterfaceInfoVO;

import java.util.List;

/**
* @author v
* @description 针对表【user_interface_info(用户调用接口关系表)】的数据库操作Service
* @createDate 2023-09-27 10:22:14
*/
public interface UserInterfaceInfoService extends IService<UserInterfaceInfo> {

    /**
     * 校验
     *
     * @param userInterfaceInfo
     * @param add 是否为创建校验
     */
    void validUserInterfaceInfo(UserInterfaceInfo userInterfaceInfo, boolean add);

    /**
     *
     * @param interfaceInfoId 接口id
     * @param userId 用户 id
     * @return
     */
    boolean invokeCount(long interfaceInfoId, long userId);

    /**
     * 获取top的接口的总调用次数
     * @return
     */
    List<InterfaceInfoVO> listTopInvokeInterfaceInfo();


}
